package DigestUtils;

import org.apache.commons.codec.digest.DigestUtils;

/**
 * @program: pangu
 * @description:
 * @author: fengjd
 * @create: 2022-06-23 09:55
 **/
public class DigestUtilsTest {

    public static void main(String[] args) {

        /* md5 加密*/
        String md5Hex = DigestUtils.md5Hex("苏三说技术");
        System.out.println(md5Hex);

        /* sha256加密 */
        byte[] sha256 = DigestUtils.sha256("苏三说技术");
        System.out.println("sha256 = " + sha256);

    }
}
